package chainhandler;


public class HandlerFactory {

	/**
	 * 创建Handler 的工厂方法
	 * @return
	 */
	public static Handler createHandler() {
		Handler c1 = new ConcretHandler();
		Handler c2 = new ConcretHandler2();
		Handler c3 = new ConcretHandler3();
		
		c1.setSuccessor(c2);
		c2.setSuccessor(c3);
		
		return c1;
	}

}
